<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../config/config.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<link rel="stylesheet" href="<%=basePath %>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=basePath %>/css/bootstrap-theme.min.css" />
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}

.table tr td {
	border: 1px solid transparent !important;
}

.form-control {
	width: 14%;
}
</style>
</head>
<body>
	<form action="<%=basePath %>/adminServlet?method=update" method="post"
		onsubmit="return getPwd()">
		<input type="hidden" name="id" />
		<table class="table table-condensed">
			<tr>
				<td width="8%" style="line-height: 32px;">用户编号</td>
				<td><input type="text" name="adminId" value="${admin.adminId }"
					class="form-control" required readonly /></td>
			</tr>
			<tr>
				<td style="line-height: 32px;">用户名称</td>
				<td><input type="text" name="adminName"
					value="${admin.adminName }" class="form-control" required /></td>
			</tr>
			<tr>
				<td style="line-height: 32px;">密码重置</td>
				<td><input type="password" name="password" id="password"
					value="${admin.adminPwd }" class="form-control" required /></td>
			</tr>
			<tr>
				<td style="line-height: 32px;">密码确认</td>
				<td><input type="password" name="adminPwd" id="pwd"
					value="${admin.adminPwd }" class="form-control" required /></td>
			</tr>
			<tr>
				<td></td>
				<td>
					<button type="submit" class="btn btn-primary">保 存</button>&nbsp;&nbsp;
					<button type="button" class="btn btn-success" name="backid"
						id="backid">返 回</button>
				</td>
			</tr>
		</table>
	</form>
</body>
<script src="<%=basePath %>/js/jquery-3.2.1.min.js"></script>
<script src="<%=basePath %>/js/bootstrap.min.js"></script>
<script>
	function getPwd(){
		var password=document.getElementById("password").value;
		var pwd=document.getElementById("pwd").value;
		if(password!=pwd){
			alert("两次输入密码不一样，请再次确认!!!");
			return false;
		}
		return true;
	}
    $(function () {       
		$('#backid').click(function(){
				window.location.href="Admin/index.jsp";
		 });

    });
</script>
</html>